#include <stdio.h>
int main()
{
    int temp = 0;
    char arry[15];
    // mod[13] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'X'};
    for (int i = 0; i < 13; i++)
        scanf("%c", &arry[i]);

    for (int i = 0, j = 1; i < 12; i++)
    {
        if (arry[i] == 45)
        {
            continue;
        }
        else
        {
            temp += (arry[i] - '0') * j;
            j++;
        }
    }
    int ans = temp % 11;
    if (ans == 10)
    {
        if (arry[12] == 'X')//'X'=88
        {
            printf("Right\n");
            return 0;
        }
        else
        {
            arry[12] = 'X';
            for (int i = 0; i < 13; i++)
            {
                printf("%c", arry[i]);
            }
        }
    }
    else
    {
        if (arry[12] == ans+'0')
        {
            printf("Right\n");
            return 0;
        }
        else
        {
            arry[12] = ans+'0';
            for (int i = 0; i < 13; i++)
            {
                printf("%c", arry[i]);
            }
        }
    }

    return 0;
}
